home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-08-14 | 9.4 KB | 265 lines | [TEXT/MPS ] |
-
- ;-------------------------------------------------------------------
- ;
- ; General structure:
- ;
- ; [Format/Header]
- ; |
- ; |
- ; [sResource Directory]
- ; / \
- ; / \
- ; / \
- ; / \
- ; [Board sResource] [Video sResource]
- ; - Primary Init. - Driver Directory.
- ; - Vendor Info. - Parameters for 1, 2 & 4-bit modes.
- ;
- ;
- ;-------------------------------------------------------------------
-
- MACHINE MC68020
-
- ;=====================================================================
- ; Initial Assembler Directives
- ;=====================================================================
- STRING C
-
- PRINT OFF
- INCLUDE 'SysErr.a' ;Macintosh System equates
- INCLUDE 'SysEqu.a' ;Macintosh System equates
- INCLUDE 'ROMEqu.a' ;Declaration ROM equates
- INCLUDE 'SlotEqu.a' ;Slot Manager equates and macros
- INCLUDE 'TimeEqu.a' ;Macintosh traps
- INCLUDE 'Traps.a' ;Macintosh traps
- INCLUDE 'VideoEqu.a' ;Video driver equates
- INCLUDE 'DepVideoEqu.a' ;Video driver equates
- PRINT ON
-
- ;
- ;=====================================================================
- ; BEGIN Declaration ROM
- ;=====================================================================
- VideoDeclROM MAIN
-
-
- WITH VDPageInfo, SlotIntQElement
-
-
-
- ;*************************************************************
- ;Constants
- ;*************************************************************
-
- ROMSize EQU $1000 ;4K byte ROM
- TheBoardId EQU $0005 ;the Board Id (from DTS)
-
- ;----------- sResource Directory ;<Id OF>
- sRsrc_Board EQU 1 ;Board sResource {May be any number in [0..127]}
- sRsrc_Video EQU 128 ;Video sResource {May be any number in [128..254]}
-
-
-
- ;=====================================================================
- ; Directory
- ;=====================================================================
- _sRsrcDir OSLstEntry sRsrc_Board,_sRsrc_Board ;References the board sResource.
- OSLstEntry sRsrc_Video,_sRsrc_Video ;References the video sResource.
- DatLstEntry endOfList,0 ;End of the list.
-
-
- ;=============================================================
- ; sRsrc_Board List
- ;=============================================================
- _sRsrc_Board OSLstEntry sRsrcType,_BoardType ;References the sResource type.
- OSLstEntry sRsrcName,_BoardName ;References the sResource name.
- DatLstEntry boardId,TheBoardId ;The board Id.
- OSLstEntry primaryInit,_sPInitRec ;References the Primary init record.
- OSLstEntry vendorInfo,_VendorInfo ;References the Vendor information list.
- DatLstEntry endOfList,0 ;End of the list.
-
- _BoardType DC.W CatBoard ;The Board sResource : <Category>
- DC.W TypBoard ; <Type>
- DC.W 0 ; <DrvrSw>
- DC.W 0 ; <DrvrHw>
- _BoardName DC.L 'Macintosh II video card' ;The name of the Board - should be
- ;the official product name
-
-
- ;-------------------------------------------------------------
- ; Primary Init Record
- ;-------------------------------------------------------------
- _sPInitRec DC.L _EndsPInitRec-_sPInitRec ;The physical Block Size
- ;;; INCLUDE 'PrimaryInit.a' ;The Header/Code (See PrimaryInit.a)
- _EndsPInitRec EQU * ;End of block
- STRING C ;Restore to 'c' string type.
-
-
- ;-------------------------------------------------------------
- ; Vendor Info record
- ;-------------------------------------------------------------
- _VendorInfo OSLstEntry VendorId,_VendorId ;References the Vendor Id.
- OSLstEntry RevLevel,_RevLevel ;References the Revision Level.
- OSLstEntry PartNum,_PartNum ;References the Part Number.
- DatLstEntry endOfList,0 ;End of the list.
-
- _VendorId DC.L 'Apple Computer' ;The Vendor Id
- _RevLevel DC.L 'Beta-7.0' ;The Revision Level
- _PartNum DC.L 'TFB-1' ;The Part Number
-
-
- ;
- ;=============================================================
- ; sRsrc_Video
- ;=============================================================
- _sRsrc_Video OSLstEntry sRsrcType,_VideoType ;References the sResource Type.
- OSLstEntry sRsrcName,_VideoName ;References the sResource Name.
- OSLstEntry sRsrcDrvrDir,_VidDrvrDir ;References the driver directory.
- DatLstEntry sRsrcHWDevId,1 ;The hardware device Id.
-
- OSLstEntry MinorBaseOS,_MinorBase ;References the Minor Base Offset.
- OSLstEntry MinorLength,_MinorLength ;References the Minor Base Length.
-
- ;Parameters
- OSLstEntry OneBitMode,_OneBitMode ;References the one-bit mode parameters.
- OSLstEntry TwoBitMode,_TwoBitMode ;References the two-bit mode parameters.
- OSLstEntry FourBitMode,_FourBitMode ;References the three-bit mode parameters.
-
- DatLstEntry endOfList,0 ;End of the list.
-
-
- _VideoType DC.W CatDisplay ;Video sResource : <Category>
- DC.W TypVideo ; <Type>
- DC.W DrSwApple ; <DrvrSw>
- DC.W DrHwTFB ; <DrvrHw>
-
- _VideoName DC.L 'Display_Video_Apple_TFB' ;Convention: _VideoName is derived by
- ;using _VideoType above, but stripping
- ;off the Cat,Typ, and DrSw/Hw prefixes, then
- ;separating by underscores
-
- _MinorBase DC.L defMinorBase ;Video RAM Offset is 0
- _MinorLength DC.L defMinorLength ;Video RAM length is $40000
-
-
-
- ;-------------------------------------------------------------
- ; Driver directory
- ;-------------------------------------------------------------
- _VidDrvrDir OSLstEntry sMacOS68020,_sMacOS68020 ;References the Macintosh-OS 68020 driver.
- DatLstEntry endOfList,0 ;End of the list.
-
-
- ;Driver-1 (68020).
- _sMacOS68020 DC.L _End020Drvr-_sMacOS68020 ;The physical Block Size
- INCLUDE 'C & D Ex Drvr.a' ;The Header/Code (See TFBDrvr.a)
- _End020Drvr EQU * ;The end of the driver.
- STRING C
-
-
- ;
- ;-------------------------------------------------------------
- ; One-Bit per pixel parameter list.
- ;-------------------------------------------------------------
- _OneBitMode OSLstEntry mVidParams,_OneVidParams ;References the one-bit mode parameter record.
- DatLstEntry mPageCnt,4 ;The page count.
- DatLstEntry mDevType,defmDevType ;The device type.
- DatLstEntry endOfList,0 ;End of the list.
-
-
- _OneVidParams DC.L _EndOneVParams-_OneVidParams ;The physical Block Size.
-
- DC.L defmBaseOffset
- DC.W 1024/8 ;Bounds.R*PixelSize/8
- DC.W defmBounds_T,defmBounds_L,defmBounds_B,defmBounds_R
- DC.W defVersion ;bmVersion
- DC.W 0 ;packType not used
- DC.L 0 ;packSize not used
- DC.L defmHRes ;bmHRes
- DC.L defmVRes ;bmVRes
- DC.W defPixelType ;bmPixelType
- DC.W 1 ;bmPixelSize
- DC.W defCmpCount ;bmCmpCount
- DC.W 1 ;bmCmpSize
- DC.L defmPlaneBytes ;bmPlaneBytes
-
- _EndOneVParams EQU * ;End of block.
-
-
- ;-------------------------------------------------------------
- ; TWO-Bit per pixel parameter list.
- ;-------------------------------------------------------------
- _TwoBitMode OSLstEntry mVidParams,_TwoVidParams ;References the two-bit mode parameter record.
- DatLstEntry mPageCnt,2 ;The page count.
- DatLstEntry mDevType,defmDevType ;The device count.
- DatLstEntry endOfList,0 ;End of the list.
-
- _TwoVidParams DC.L _EndTwoVParams-_TwoVidParams ;Physical Block Size.
-
- DC.L defmBaseOffset
- DC.W 1024*2/8 ;Bounds.R*PixelSize/8
- DC.W defmBounds_T,defmBounds_L,defmBounds_B,defmBounds_R
- DC.W defVersion ;bmVersion
- DC.W 0 ;packType not used
- DC.L 0 ;packSize not used
- DC.L defmHRes ;bmHRes
- DC.L defmVRes ;bmVRes
- DC.W defPixelType ;bmPixelType
- DC.W 2 ;bmPixelSize
- DC.W defCmpCount ;bmCmpCount
- DC.W 2 ;bmCmpSize
- DC.L defmPlaneBytes ;bmPlaneBytes
-
- _EndTwoVParams EQU * ;End of block.
-
-
- ;
- ;-------------------------------------------------------------
- ; Four-Bit per pixel parameter list.
- ;-------------------------------------------------------------
- _FourBitMode OSLstEntry mVidParams,_FourVidParams ;References the four-bit mode parameter record.
- DatLstEntry mPageCnt,1 ;The page count.
- DatLstEntry mDevType,defmDevType ;The device type.
- DatLstEntry endOfList,0 ;End of the list.
-
- _FourVidParams DC.L _EndFourVParams-_FourVidParams ;Physical Block Size.
-
- DC.L defmBaseOffset
- DC.W 1024*4/8 ;Bounds.R*PixelSize/8
- DC.W defmBounds_T,defmBounds_L,defmBounds_B,defmBounds_R
- DC.W defVersion ;bmVersion
- DC.W 0 ;packType not used
- DC.L 0 ;packSize not used
- DC.L defmHRes ;bmHRes
- DC.L defmVRes ;bmVRes
- DC.W defPixelType ;bmPixelType
- DC.W 4 ;bmPixelSize
- DC.W defCmpCount ;bmCmpCount
- DC.W 4 ;bmCmpSize
- DC.L defmPlaneBytes ;bmPlaneBytes
-
- _EndFourVParams EQU * ;End of block.
-
-
-
-
- ORG ROMSize-FHeaderRec.fhBlockSize
- ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- ; Format/Header Block
- ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- DC.L (_sRsrcDir-*)**$00FFFFFF ;Offset to sResource directory
- DC.L ROMSize ;Length of declaration data
- DC.L 0 ;CRC {Patched by crcPatch (MPW tool)}
- DC.B romRevision ;Revision level
- DC.B AppleFormat ;Format
- DC.L TestPattern ;Test pattern
- DC.B 0 ;Reserved byte (must be zero)
- DC.B $E1 ;ByteLanes: 1110 0001 (bytelane 0)
-
-
- ENDP
-
-
- END
-
-